<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>商品添加</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" style="width:80%;">
  <input type="hidden" id="id" name="id" value="${activity.id}" />
  <input type="hidden" id="status" name="status" value="${activity.status}" />
  <input type="hidden" id="itemId" name="itemId" value="${item.id}" />

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">商品名称</label>
    <div class="layui-input-block">
      <input type="text"  class="layui-input name" disabled value="${item.title}" >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">活动人次</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input name" <#if activity.status?if_exists&&activity.status==2>disabled</#if> id="totalNum" name="totalNum"  placeholder="请输入商品价格" maxlength="30" lay-verify="required"
          <#if activity.totalNum?if_exists&&activity.totalNum!=0 >value="${activity.totalNum}" <#else>value="${item.personNum}"</#if> >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">期数</label>
    <div class="layui-input-block">
      <input type="text" <#if activity.id?if_exists >disabled</#if> class="layui-input name" id="periodsNum" name="periodsNum" value="${oldPeriodsNum}" >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">是否自动</label>
    <div class="layui-input-block">
      <!--<input type="radio" name="isAuto" value="1" title="自动" checked>
      <input type="radio" name="isAuto" value="2" title="手动">-->
      <input type="checkbox" <#if activity.status?if_exists&&activity.status==2>disabled</#if> id="isAuto" name="isAuto" lay-skin="switch" value="1" <#if activity.isAuto==1 >checked</#if> >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <div class="layui-input-block">
      <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btnSubmit">确定</button>
      <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary closeLay">取消</button>
    </div>
  </div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/item/activityUpdateOrSave.js"></script>

</body>
</html>